package com.restkeeper.gateway.config.customCode.HandlerRexecute;


import com.restkeeper.gateway.config.customCode.dic.CodeConstants;
import com.restkeeper.gateway.config.customCode.handler.CustomCodeHandler;
import com.restkeeper.gateway.config.customCode.utils.CustomCodeUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.Map;

@Slf4j(topic = "custom-code")
@Component(CodeConstants.BEAN_PREFIX + CodeConstants.MessageType.CODE_DECODE)
public class Decode implements CustomCodeHandler {
    /**
     * 解码
     * */
    @Override
    public String handle(Map<String, String> params) {
        String code = params.get("EDCODE");
        return CustomCodeUtils.getCustomDecode(code);
    }
}
